<?php  
class ControllerModuleWelcomePopup extends Controller {
	protected function index($setting) {
		
		if(isset($setting['description'][$this->config->get('config_language_id')]))
			$this->data['message'] = html_entity_decode($setting['description'][$this->config->get('config_language_id')], ENT_QUOTES, 'UTF-8');
		else{
			$this->data['message']="";
		}
		$this->data['width']= $setting['width'];
		$this->data['height']= $setting['height'];
		$this->data['layout']= $setting['layout_id'];
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/welcomepopup.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/welcomepopup.tpl';
		} else {
			$this->template = 'default/template/module/welcomepopup.tpl';
		}
		
		$this->render();
	}
}
?>